function [coopf,coopm,kappa] = coopD(H, wf, wm, t, det_earn_f, det_earn_m, gamma, lambda, dt)

kappa=lambda+(1-lambda)*gamma;

W=w(det_earn_m,t,H-1,wm, dt)+w(det_earn_f,t-(H-1),0,wf,dt);

coopf=log(lambda*0.61*kappa*(W*(1/(1+kappa)))^2); 
coopm=log((1-lambda)*0.61*W*(1/(1+kappa))*(W*(kappa/(1+kappa)))^(gamma));

end
